//
// Created by Lenovo on 2020/10/14.
//

#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
#define ll long long
ll pri[]={0,2,3,5,7,11,13,17,19,23,29,31,37,41,43,47};
ll n;
ll dfs(ll num, ll pos,ll k,ll ans)
{
    if(pos>15) return 0;
    ll ret = ans;
    for(int i = 1;i<=k;i++)
    {
        if(n/pri[pos]<num) break;
        num *= pri[pos];
        ret = max(ret,dfs(num,pos+1,i,ans*(i+1)));
    }
    return ret;
}
int main()
{
    int t;
    scanf("%d",&t);
    while(t--)
    {
        scanf("%lld",&n);
        ll ans = dfs(1,1,64,1);
        printf("%lld\n",ans);
    }
}